home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinical Endocrinology
/
Clinical Endocrinology.iso
/
pc
/
00000000
/
14000000
/
shared.dir
/
00911_Script_911
< prev
next >
Wrap
Text File
|
1995-11-17
|
2KB
|
89 lines
-- This handler freezes the channels containing text, diagrams
-- captions, and buttons by puppeting them. The aim is to keep
-- the background looking the same when the menus are used.
-- These should be unpuppeted when returning.
on puppetsOn
repeat with i = 4 to 10
puppetSprite i, true -- text, diags, captions
end repeat
puppetSprite 33, true -- left arrow
puppetSprite 34, true -- right arrow
if the clickOn = 14 then
repeat with i = 15 to 17
set the visibility of sprite i to true -- menu bits
end repeat
else
repeat with i = 15 to 17
set the visibility of sprite i to false -- menu bits
end repeat
end if
repeat with i = 39 to 45
--puppetSprite i, true -- hypertext
end repeat
end puppetsOn
----------------------------------------------------------
-- This handler is the opposite to the one above.
on puppetsOff
global menuSwitch
repeat with i = 4 to 10
puppetSprite i, false -- text, diags, captions
end repeat
puppetSprite 33, false -- left arrow
puppetSprite 34, false -- right arrow
repeat with i = 39 to 45
puppetSprite i, false -- hypertext
end repeat
set menuSwitch = "off"
puppetSprite 15, false
repeat with i = 15 to 17
set the visibility of sprite i to false -- menu bits
end repeat
end puppetsOff
----------------------------------------------------------
-- This handler should be called on the mouseDown.
-- The handler swops the castmember for the next in line
-- until the mouse button is released. If the mouse
-- is over the original sprite it does the attatched
-- script. If the mouse has moved off the sprite
-- the result is no action.
on ButtonCheck theScriptToDo
put the clickOn into whichSprite
put the castNum of sprite whichSprite into whichcast
set the castNum of sprite whichSprite = whichcast + 1
updateStage
repeat while the stillDown
end repeat
if the mouseCast <> whichcast + 1 then
nothing
else
sound playFile 1, "Click.aif"
do theScriptToDo
end if
end ButtonCheck
----------------------------------------------------------